<script>
export default {
	onLaunch: function() {
		try {
			const value = uni.getStorageSync('token');
			if (!value) {
				// 没登录就跳转到登录页
				uni.redirectTo({
					url: 'pages/login/login'
				});
			} else {
				console.log('token存在');
			}
		} catch (e) {
			// error
		}
	},
	onShow: function() {
		console.log('App Show');
	},
	onHide: function() {
		console.log('App Hide');
	}
};
</script>

<style>
/*每个页面公共css */
</style>
